<?php
// +----------------------------------------------------------------------
// | quanli team
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2020 http://www.fistforward.com/ All rights reserved.
// +----------------------------------------------------------------------
// | Author: create by allen.qiang
// +----------------------------------------------------------------------


/**
 * 地图区域划分
 * @package  htdocs
 * @subpackage  quanliadmin
 * @author   create by allen.qiang
 */

quanli_require('module/base/system/sysRegion.class.php');

class pa_mapAreaZoning {

    public function execute() {

        if (isset($_REQUEST['operFlg']) && quanli_is_int($_REQUEST['operFlg'])) {

            switch ($_REQUEST['operFlg']) {

                case 1: //地图区域划分
                    $this->mapAreaZoning();
                    break;

                default:
                    backendError();
                    break;

            }

        } else {

            backendError();

        }

    }

    /**
     * 地图区域划分
     */
    private function mapAreaZoning() {

        global $G_PGLOB;

        $G_PGLOB->smarty->assign_by_ref('city_array', get_city());

        //品牌
        quanli_include('module/base/system/itemHandler.class.php');
        $itemHandler = new itemHandler( $G_PGLOB->DBCA );
        $item_array = array(
            'useFlg' => 1,
            'itemCategoryID' => 13
        );
        $brand_array = $itemHandler->searchItem( $item_array );
        $G_PGLOB->smarty->assign_by_ref('brand_array', $brand_array);
        $G_PGLOB->smarty->display('system/mapAreaZoning.tpl');
    }

}

